FROM choerodon/cibase:0.11.4 as builder

WORKDIR /tmp/snake-web
COPY . /tmp/snake-web
RUN npm config set registry https://registry.npm.taobao.org && yarn && yarn build:prod

# -----------------------------------------------------------------------------
FROM choerodon/frontbase:0.8.0

COPY --from=builder /tmp/snake-web/dist /usr/local/openresty/nginx/html

CMD [ "nginx", "-g", "daemon off;" ]